package com.zyong.design.pattern.state.case3;

/**
 * @program: zyong-design-pattern
 * @ClassName: Client
 * @author: zyong
 * @create: 2024-03-24 23:01
 */
public class Client {
    public static void main(String[] args) {
        Context context = new Context();
        context.setState(new PublishState());
        System.out.println(context.getCurrentState());

        // publish -> not pay
        context.acceptOrderEvent(context);
        // not pay -> paid
        context.payOrderEvent(context);
    }
}
